package cn.znzz.cjm.oauth;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "oauth2.client")
@Data
public class OauthClientDetailsProperties {
    private Oauth2ClientDetails website;
    private Oauth2ClientDetails system;

    public Oauth2ClientDetails getOauth2ClientDetails(Integer type){
        if(type==0){
            return system;
        }else if(type==1){
            return website;
        }else{
            return null;
        }
    }
}
